<!DOCTYPE html>
<style>
::-webkit-scrollbar { display: none; }
body { margin: 0px; }
.float { float: left; width: 50px; height: 100px; background: green; }
#content { overflow: hidden; margin-top: -100px; width: 50px; height: 100px; background: green; }
.container { width: 100px; background: red; }
</style>
<div class="container">
  <div>
    <div class="float"></div>
    <br clear=all>
  </div>
  <div style="display:table;"></div>
  <div id="content" data-offset-x=50></div>
</div>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script>
    test(() => {
        var hr = document.getElementById("content");
        assert_equals(hr.offsetLeft, 50);
    }, "crbug.com/666487: There should be a green square.");
</script>
